#ifndef TLIST_H
#define TLIST_H


struct TListObj 
{
	TListObj*	_prior;
	TListObj*	_next;
};

class TList
{
public:
	TList( void );
	virtual ~TList( void );

	void Init( void );
	void AddObj( TListObj* obj );
	void DelObj( TListObj* obj );

	TListObj* TopObj( void );
	TListObj* NextObj( TListObj* obj );

	bool IsEmpty( void );
	void MoveList( TList* fromList );	

protected:
	TListObj	_top;
}; // TList

/*
 *	
 */
enum { FREE_LIST, USED_LIST, RLIST_MAX };
class TRecycleList
{
public:
	TRecycleList( int initCount, int size );
	virtual ~TRecycleList();

	TListObj* GetObj( int listType );
	void PutObj( int listType, TListObj* obj );

protected:
	char*	_data;
	TList	_lists[RLIST_MAX];

};	// TRecycleList

#endif	// TLIST_H